package local.blueheart.data.springdatademo.domain.config;

import local.blueheart.data.springdatademo.domain.system.AbstractDomainClass;
import lombok.Data;
import lombok.ToString;
import org.hibernate.annotations.Fetch;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.OneToMany;
import java.util.List;

@Entity
@Data
@ToString(exclude = {"itemDOList"})
public class ModuleDO extends AbstractDomainClass {

    private String name;

    private String alias;

    private String search;

    @OneToMany(fetch = FetchType.EAGER,mappedBy = "moduleDO",cascade = CascadeType.ALL)
    private List<ItemDO> itemDOList;


}
